Skip to content

Face-down dock-hold (lock attitude + precision gain)#61

Draft
mringsby wants to merge 1 commit into
feature/global-framefrom
feature/dock-hold
Draft

Face-down dock-hold (lock attitude + precision gain)#61
mringsby wants to merge 1 commit into
feature/global-framefrom
feature/dock-hold

Conversation

@mringsby

@mringsby mringsby commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

What

One-button dock-hold that locks the ROV face-down for docking and gives the pilot finer control for the approach.

  • Engage: capture current heading, send a setpoint override holding pitch ~90° nose-down, roll level, current yaw; save current gains and drop to a precision master gain (DOCK_GAIN). Surge/sway/heave stay under pilot control.
  • Release: clear the override and restore the saved gains.
  • Reuses the existing setpoint-override service (UDP 5007) and the controller gain system — no firmware/protocol change.
  • Toggle from: gamepad Y button, the home Docking button (previously an unwired stub), or the debug page (engage/release + status). New endpoints /api/dock/{toggle,engage,release,status}; dock state also in /api/command/status.

⚠️ Stacked PR

Based on feature/global-frame (which is based on feature/light-control). Review/merge the stack in order: light-control → global-frame → dock-hold.

Depends on tuned PID

The override only physically holds attitude when pitch/roll/yaw PID gains are non-zero/tuned (confirmed tuned by the team).

Verification

  • ruff check . + ruff format --check . — pass.
  • pytest tests/test_controller.py — pass (engage locks attitude + applies gain; release clears + restores gains; toggle; missing-client error).
  • ⚠️ In-water TODO: confirm DOCK_PITCH_DEG sign/magnitude for true face-down (firmware negates pitch internally); tune DOCK_GAIN.

🤖 Generated with Claude Code

Adds a one-button dock-hold that locks the ROV face-down for docking and gives
the pilot finer control for the approach:

- Engage: capture current heading and send a setpoint override holding pitch
  ~90deg nose-down, roll level, and current yaw; save the current gains and drop
  to a precision master gain. Surge/sway/heave stay under pilot control.
- Release: clear the override and restore the saved gains.
Relies on the already-tuned pitch/roll/yaw PID (the override only holds attitude
when those gains are non-zero) and reuses the existing setpoint-override service
(UDP 5007) -- no firmware/protocol change.

Toggle from the gamepad (Y button), the home Docking button (previously an
unwired stub), or the debug page. New endpoints: /api/dock/toggle|engage|release
|status; dock state also surfaced in /api/command/status.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant